/**
 * 供应商管理
 */

import request from '@/utils/request'

/**
 * 客户供应商管理列表
 * @param {*} params 
 */
export function supplierList(params = {}) {
  return request({
    url: '/basic-data/supplier/list',
    method: 'get',
    params: params
  })
}

/**
 * 渠道列表(租户)
 * @param {*} params 
 * @returns 
 */
export function tenantOptions(params = {}) {
  params = {tenantType:'CUSTOMER',...params}
  return request({
    url: '/system/tenant/optionSelect',
    method: 'get',
    params: params
  })
}

/**
 * 接收erp推送数据
 * @param {*} params 
 */
export function addSupplierInfo(params = {}) {
  return request({
    url: '/basic/data/supplier/addSupplierInfo',
    method: 'post',
    data: params
  })
}

/**
 * 修改供应商信息
 * @param {*} params 
 */
export function editSupplierInfo(params = {}) {
  return request({
    url: '/basic/data/supplier/editSupplierInfo',
    method: 'post',
    data: params
  })
}

/**
 * 删除供应商信息
 * @param {*} params 
 */
export function delSupplierInfo(params = {}) {
  return request({
    url: '/basic/data/supplier/delSupplierInfo',
    method: 'post',
    data: params
  })
}